home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 042a / rkpls301.zip / RKP3ENC.DOC < prev    next >
Text File  |  1993-03-04  |  10KB  |  269 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                   ▄▄▄▄▄▄▄           ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄
  10.                   █     █                 █ █
  11.                   █▄▄▄▄▄█ ▄ ▄▄ ▄▄▄▄    ▄▄▄█ █▄▄     ▄▄▄ ▄ ▄▄▄▄
  12.                   █   █   █▄█▄ █▄▄█       █ █       █ █ █ █
  13.                   █   █▄▄ █  █ █    ▄▄▄▄▄▄█ █▄▄▄▄▄▄ █ █▄█ █▄▄▄
  14.  
  15.  
  16.              RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0
  17.                                by C. Scott Davis
  18.                           (c) 1993 Serious Cybernetics
  19.  
  20. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page i
  21.           
  22.  
  23.                       T A B L E   O F   C O N T E N T S
  24.  
  25.       ═══════════════════════════════════════════════════════════════════
  26.  
  27.         Sec    D e s c r i p t i o n                               Page
  28.  
  29.                Table of Contents .................................. i
  30.         1.0    What Is Rkp3Enc? ................................... 1
  31.         2.0    Using Rkp3Enc ...................................... 1
  32.         3.0    Rkp3Enc Procedures ................................. 1
  33.         3.1    SetOwnerCode ....................................... 2
  34.         3.2    SetProgCode ........................................ 3
  35.         3.3    SetVerCode ......................................... 4
  36.         4.0    Additional Information On Rkp3Enc .................. 5
  37.         5.0    Copyright Notices .................................. 5
  38.         6.0    Index .............................................. 6
  39.  
  40. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page 1
  41.  
  42.  
  43. 1.0 - What is Rkp3Enc?
  44.  
  45. Rkp3Enc is a Turbo Pascal (tm) unit that allows RkPlus 3.0 to generate and use 
  46. version 3.x/compatible keys.  It contains definitions for SetOwnerCode, 
  47. SetProgCode, and SetVerCode, as well as new encoding functions for RkPlus 3.x.
  48.  
  49. If version 2.x/compatible keys are required, Rkp2Enc should be used instead; or 
  50. for additional security, user-written encoding functions may be defined (see 
  51. RKPLUS.DOC for more information).
  52.  
  53.  
  54. 2.0 - Using Rkp3Enc
  55.  
  56. To use Rkp3Enc, the programmer must place it AFTER RkPlus in the Uses 
  57. definition (as shown below).
  58.  
  59.   Uses
  60.     RkPlus, Rkp3Enc;
  61.  
  62. In addition, SetOwnerCode, SetProgCode and SetVerCode must be called, before 
  63. any RkPlus calls are made (otherwise the RkPlus function RkpError will return 
  64. InvalidParameter).  No other procedure or function calls are needed, as Rkp2Enc 
  65. is automatically activated when it is Used.
  66.  
  67. If Rkp3Enc is corrupt or has been tampered with, the RkPlus function RkpError 
  68. will return BadTPU.  If the RkPlus 3.0 version of Rkp3Enc is used with any 
  69. version other than 3.0, the RkPlus function RkpError will return 
  70. VersionMismatch.
  71.  
  72.  
  73. 3.0 - Rkp3Enc Procedures
  74.  
  75. The following Procedures are defined in Rkp3Enc:
  76.  
  77. SetOwnerCode
  78. SetProgCode
  79. SetVerCode
  80.  
  81. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page 2
  82.  
  83.  
  84. 3.1 - SetOwnerCode
  85.  
  86. ┌──────────────────────────────────────────┐
  87. │ Procedure SetOwnerCode(Var v; b : Byte); │
  88. └──────────────────────────────────────────┘
  89.  
  90. This procedure must be called before any of the RkPlus procedures or functions. 
  91. The variable v may be of any type, and b specifies the length of v (up to 255 
  92. bytes).  The variable passed as v is used (along with the variables passed to 
  93. SetProgCode and SetVerCode) to generate the registration keys.  This variable 
  94. should probably be the same for all software written by a single 
  95. person/company.  Since is it used to cause your keys to be different from those 
  96. of other programmers who are also using RkPlus, the more cryptic this variable 
  97. is, the more secure your keys will be.
  98.  
  99. Examples :
  100.  
  101. ┌───────────────────────────────┐
  102. │ Var                           │
  103. │   s : String[30];             │
  104. │                               │
  105. │                               │
  106. │ s := 'Read$Make@Into';        │
  107. │ SetOwnerCode(s[1],Length(s)); │
  108. └───────────────────────────────┘
  109.   
  110. Note that when the variable passed to SetOwnerCode is a string, the first 
  111. character of the string should be passed (rather than the string itself) and 
  112. the length should be the length of the string (Length) and not the size 
  113. (SizeOf).  This is to avoid having the length byte and the "garbage" bytes at 
  114. the end of a Pascal string used in the key encryption.
  115.  
  116. ┌─────────────────────────────────┐
  117. │ Var                             │
  118. │   a : Array[1 to 5] of LongInt; │
  119. │                                 │
  120. │                                 │
  121. │ a[1] := $3C1F29EC;              │
  122. │ a[2] := $A446B902;              │
  123. │ a[3] := $6C568DA0;              │
  124. │ a[4] := $0B197E23;              │
  125. │ a[5] := $F8F501C7;              │
  126. │ SetOwnerCode(a,SizeOf(a));      │
  127. └─────────────────────────────────┘
  128.  
  129. IMPORTANT : You should NOT use any of the actual examples used here or in the 
  130. sample programmes included with RkPlus.  If you do, anyone else who uses the 
  131. same example will have IDENTICAL keys!
  132.  
  133. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page 3
  134.  
  135.  
  136. 3.2 - SetProgCode
  137.  
  138. ┌─────────────────────────────────────────┐
  139. │ Procedure SetProgCode(Var v; b : Byte); │
  140. └─────────────────────────────────────────┘
  141.  
  142. This procedure must be called before any of the RkPlus procedures or functions. 
  143. The variable v may be of any type, and b specifies the length of v (up to 255 
  144. bytes).  The variable passed as v is used (along with the variables passed to 
  145. SetOwnerCode and SetVerCode) to generate the registration keys.  Unlike the 
  146. variable passed to SetOwnerCode, this variable doesn't need to be particularly 
  147. cryptic.
  148.  
  149. Examples :
  150.  
  151. ┌──────────────────────────────┐
  152. │ Var                          │
  153. │   s : String[15];            │
  154. │                              │
  155. │                              │
  156. │ s := 'RkStuff';              │
  157. │ SetProgCode(s[1],Length(s)); │
  158. └──────────────────────────────┘
  159.  
  160. If you wrote a programme called RkSample and a programme called RkUtils and you 
  161. passed 'RkStuff' to SetProgCode in both programmes, a key for one programme 
  162. would work for the other (assuming that SetOwnerCode and SetVerCode were also 
  163. passed the same values in both programmes).
  164.  
  165. ┌──────────────────────────────┐
  166. │ Var                          │
  167. │   t : String[10];            │
  168. │                              │
  169. │                              │
  170. │ t := 'RkSample';             │
  171. │ SetProgCode(t[1],Length(t)); │
  172. └──────────────────────────────┘
  173.  
  174. If you wrote a programme called RkSample and a programme called RkUtils and you 
  175. passed 'RkSample' to SetProgCode in RkSample and passed a different value to 
  176. SetProgCode in RkUtils, a key for one would NOT work for the other.
  177.  
  178. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page 4
  179.  
  180.  
  181. 3.3 - SetVerCode
  182.  
  183. ┌────────────────────────────────────────┐
  184. │ Procedure SetVerCode(Var v; b : Byte); │
  185. └────────────────────────────────────────┘
  186.  
  187. This procedure must be called before any of the RkPlus procedures or functions. 
  188. The variable v may be of any type, and b specifies the length of v (up to 255 
  189. bytes).  The variable passed as v is used (along with the variables passed to 
  190. SetOwnerCode and SetProgCode) to generate the registration keys.  Unlike the 
  191. variable passed to SetOwnerCode, this variable doesn't need to be cryptic at 
  192. all.
  193.  
  194. Examples :
  195.  
  196. ┌───────────────────────────┐
  197. │ Var                       │
  198. │   c : Char;               │
  199. │                           │
  200. │                           │
  201. │ c := '2';                 │
  202. │ SetProgCode(c,SizeOf(c)); │
  203. └───────────────────────────┘
  204.  
  205. If you wrote a programme and passed '2' to SetVerCode in versions 2.0, 2.1 and 
  206. 2.2 of the programme; and passed '3' to SetVerCode in version 3.0, the same 
  207. key would work for versions 2.x (assuming that SetOwnerCode and SetVerCode were 
  208. passed the same values in all versions), but version 3.0 would require a 
  209. different key.
  210.  
  211. ┌───────────────────────────┐
  212. │ Var                       │
  213. │   r : Record              │
  214. │         v : Byte;         │
  215. │         u : Byte;         │
  216. │       End;                │
  217. │                           │
  218. │                           │
  219. │ r.v := 1;                 │
  220. │ r.u := 0;                 │
  221. │ SetProgCode(r,SizeOf(r)); │
  222. └───────────────────────────┘
  223.  
  224. If you wrote a programme and passed r to SetProgCode with r.v set to the major 
  225. version and r.u set to the minor update, a key for one version would NOT work 
  226. for another.
  227.  
  228. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page 5
  229.  
  230.  
  231. 4.0 - Additional Information On Rkp3Enc
  232.  
  233.  
  234. For more information on using Rkp3Enc, see the sample Turbo Pascal (tm) 
  235. programmes (RKPDEMO3.ZIP) that are distributed with RkPlus, or contact me at 
  236. any of the locations listed in RKPLUS.DOC.
  237.  
  238.  
  239. 5.0 - Copyright Notices
  240.  
  241. RkPlus (c) 1991-93 Serious Cybernetics
  242. Rkp2Enc (c) 1990-93 Serious Cybernetics 
  243. Rkp3Enc (c) 1993 Serious Cybernetics
  244. Turbo Pascal (c) 1983-89 Borland International
  245.  
  246. Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0         Page 6
  247.  
  248.  
  249. 6.0 - Index
  250.                                                                     
  251.         D e s c r i p t i o n                                     Page
  252.         -------------------------------------------------------   ----
  253.         BadTPU ...................................................  1
  254.                                                                      
  255.         InvalidParameter .........................................  1
  256.  
  257.         Procedure List ...........................................  1
  258.                                                                      
  259.         RkpError .................................................  1
  260.         Rkp3Enc ..................................................  1
  261.                                                                      
  262.         SetProgCode ..............................................  2
  263.         SetOwnerCode .............................................  3
  264.         SetVerCode ...............................................  4
  265.  
  266.         Using Rkp3Enc ............................................  1
  267.                                                                      
  268.         VersionMismatch ..........................................  1
  269.